import service from '@/utils/request'


export async function pageList(page: number, size: number) {
    return await service({
        url: `/users/` + page + '/' + size,
        method: 'get',
        // data
    })
}

export async function pageNameList(page: number, size: number, name: string) {
    return await service({
        url: `/users/logname/` + page + '/' + size + '?logname=' + name,
        method: 'get',
        // data
    })
}

export async function addReq(data: object) {
    return await service({
        url: `/users`,
        method: 'post',
        data
    })
}

export async function remove(id: any) {
    return await service({
        url: `/users/` + id,
        method: 'delete'
    })
}

export async function update(id: any, data: object) {
    return await service({
        url: `/users/` + id,
        method: 'put',
        data
    })
}